package tgc.edu.tms.entity;

import java.sql.Date;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

import tgc.edu.tms.custom.BaseEntity;
/***
 * 点名表
 * @author Administrator
 *
 */
@Entity
public class Callnames extends BaseEntity<Integer> {

	private Date time;// 时间
	private String jc; // 节次
	private String kc; // 课程
	private String teacher;// 老师
	private Student student;// 学生
	private String banji;//班级
	private String isReach;// 是否上课

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public String getJc() {
		return jc;
	}

	public void setJc(String jc) {
		this.jc = jc;
	}

	public String getKc() {
		return kc;
	}

	public void setKc(String kc) {
		this.kc = kc;
	}

	public String getTeacher() {
		return teacher;
	}

	public void setTeacher(String teacher) {
		this.teacher = teacher;
	}

	@ManyToOne
	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public String getIsReach() {
		return isReach;
	}

	public void setIsReach(String isReach) {
		this.isReach = isReach;
	}

	public String getBanji() {
		return banji;
	}

	public void setBanji(String banji) {
		this.banji = banji;
	}

	/***
	 * 
	 * @获取学生姓名
	 */
	@Transient
	public String getStudentname() {
		return student==null?null:student.getName();
	}

}
